package de.silvalauinger.objectclassmapper.schema.system.objectclass;

import static com.google.common.base.Preconditions.checkNotNull;
import static de.silvalauinger.objectclassmapper.schema.DefaultSchemaManagerFactory.SCHEMA_MANAGER;
import de.silvalauinger.objectclassmapper.schema.system.attribute.AliasedObjectName;
import static org.apache.directory.shared.ldap.model.constants.SchemaConstants.ALIAS_OC_OID;

public class Alias extends Top {

    //<editor-fold defaultstate="collapsed" desc="Statics">
    public final static org.apache.directory.shared.ldap.model.schema.ObjectClass OBJECTCLASS_TYPE = checkNotNull(SCHEMA_MANAGER.getObjectClassRegistry().get(ALIAS_OC_OID));
    //</editor-fold>
    //<editor-fold defaultstate="collapsed" desc="Attributes">
    private final AliasedObjectName aliasedObjectName;
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="Constructors">
    public Alias(final AliasedObjectName aliasedObjectName) {
        this.aliasedObjectName = requiredAttribute(aliasedObjectName, AliasedObjectName.ATTRIBUTE_TYPE.getName());
    }
    //</editor-fold>

    public final AliasedObjectName getAliasedObjectName() {
        return aliasedObjectName;
    }
}
